package cn.jly.spring.mybatis.controller;

import cn.jly.spring.mybatis.bean.Employee;
import cn.jly.spring.mybatis.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author lanyangji
 * @description employeeController
 * @date 2020/11/18 下午 4:59
 */
@Controller
public class EmployeeController {
    @Autowired
    private EmployeeService employeeService;

    @ResponseBody
    @GetMapping("/all")
    public List<Employee> getAll() {
        return employeeService.getAll();
    }
}
